home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Diamond Collection / The Diamond Collection (Software Vault)(Digital Impact).ISO / cdr47 / sch250.zip / DBFLIST.PRG next >
Text File  |  1995-01-30  |  3KB  |  103 lines

  1. *****
  2. * dbflist
  3. * Function to control the home list box
  4. *****
  5. if mvparm1=1
  6.     imgsay(04,31,14,15,-1,"","FEATURED HOME LIST")
  7.     imgsay(06,14,14,15,-1,"","NAME         LOTSIZE TOWNSHIP")
  8.     imgsay(07,14,14,15,-1,"","----         ------- -------------------------")
  9.     *****
  10.     * start up of imglistbox()
  11.     * first screen of feature list file
  12.     *****
  13.     if .not. is_open("property")
  14.         open("property","",.t.,"property")
  15.     else
  16.         fselect("property")
  17.     endif
  18.     jumpto("top")
  19.     mvcount=reccount()
  20.     mvscreen=iif(mvcount<=10,mvcount,10)
  21.     mvline=0
  22.     mvtoprow=7
  23.     mvlastline=16
  24.     mvcol=14
  25.     do while mvline<=mvscreen
  26.         mvline=mvline+1
  27.         mvtext=property->name+" "+property->lotsize+"  "+property->township
  28.         imgsay(mvtoprow+mvline,mvcol,14,15,-1,"",mvtext)
  29.         mvhomelist[mvline]=recno()
  30.         skipto(1)
  31.     enddo
  32.     mvline=mvline-1
  33.     return 1
  34. endif
  35. if mvparm1=2
  36.     *****
  37.     * Up arrow press
  38.     *****
  39.     fselect("property")
  40.     mvline=1
  41.     skipto(-20)
  42.     do while mvline<=11 .and. (.not. property->(eof()))
  43.         mvtext=property->name+" "+property->lotsize+"  "+property->township
  44.         imgsay(mvtoprow+mvline,mvcol,14,15,1,"",space(50))        
  45.         imgsay(mvtoprow+mvline,mvcol,14,15,-1,"",mvtext)
  46.         mvhomelist[mvline]=recno()
  47.         skipto(1)
  48.         mvline=mvline+1
  49.     enddo
  50.     return 1
  51. endif
  52. if mvparm1=3
  53.     *****
  54.     * Down arrow pressed
  55.     *****
  56.     fselect("property")
  57.     mvline=1
  58.     do while mvline<=11
  59.         if .not. property->(eof())
  60.             mvtext=property->name+" "+property->lotsize+"  "+property->township
  61.             mvhomelist[mvline]=recno()
  62.             skipto(1)
  63.         else
  64.             mvtext=""
  65.             if mvline<=len(mvhomelist)
  66.                 mvhomelist[mvline]=""
  67.             endif
  68.         endif
  69.         imgsay(mvtoprow+mvline,mvcol,14,15,1,"",space(50))        
  70.         imgsay(mvtoprow+mvline,mvcol,14,15,-1,"",mvtext)
  71.         mvline=mvline+1
  72.     enddo
  73.     return 1
  74. endif
  75. if mvparm1=4
  76.     return 0
  77. endif
  78. if mvparm1=5
  79.     *****
  80.     * Select Item
  81.     *****
  82.     fselect("property")
  83.     mvdataline=(int((msrow+14-1)/14)-1)*14
  84.     mvitem=(int((msrow+14-1)/14)-1)-mvtoprow
  85.     if mvitem<1 .or. mvitem>len(mvhomelist)
  86.         return 1
  87.     endif
  88.     mvrecno=mvhomelist[mvitem]
  89.     if empty(mvrecno)
  90.         return 1
  91.     endif
  92.     jumpto(mvrecno)
  93.     mvtext=property->name+" "+property->lotsize+"  "+property->township    
  94.     if empty(mvtext)
  95.         return 1
  96.     endif
  97.     graphcolor(7)
  98.     graphbox("solid",102,mvdataline,517,mvdataline+14)
  99.     imgsay(mvtoprow+mvitem,mvcol,14,15,-1,"",mvtext)
  100.     return 0
  101. endif
  102. return 1
  103.